﻿using AntUnion.FrameWork.Model.Models;
using AntUnion.FrameWork.Model.ModelsExt;
using AntUnion.FrameWork.Web.Service;
using System.Collections.Generic;

namespace AntUnion.FrameWork.Web.IService
{
    public interface ICrmService
    {

        /// <summary>
        ///  CRM账户登录验证
        /// </summary>
        /// <param name="login"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        CrmUser GetCrmUser(string login, string password, string ip);

        /// <summary>
        ///  根据账户获取信息
        /// </summary>
        /// <param name="login"></param>
        /// <returns></returns>
        CrmUser GetCrmUser(int id);

        /// <summary>
        ///  根据账户获取信息
        /// </summary>
        /// <param name="login"></param>
        /// <returns></returns>
        CrmUser GetCrmUser(string login);

        /// <summary>
        ///  修改用户密码
        /// </summary>
        /// <param name="crmUser"></param>
        /// <returns></returns>
        int UpdateCrmPassword(int crmId, string password);

        /// <summary>
        ///  创建CRM账户
        /// </summary>
        /// <param name="login"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        int AddCrmUser(string login, string password, uint group, int up, Source source);

        /// <summary>
        /// 获取CRM钱包信息
        /// </summary>
        /// <param name="crmId"></param>
        /// <returns></returns>
        List<CrmWallet> GetCrmWallet(int crmId);

        /// <summary>
        /// 创建CRM钱包
        /// </summary>
        /// <param name="crmId"></param>
        /// <returns></returns>
        int AddCrmWallet(int crmId);

        /// <summary>
        /// 获取CRM用户规则
        /// </summary>
        /// <param name="crmuserInfoType"></param>
        /// <returns></returns>
        List<CrmKyc> GetCrmKyc();

        /// <summary>
        /// 获取CRM用户规则
        /// </summary>
        /// <param name="crmuserInfoType"></param>
        /// <returns></returns>
        List<CrmKyc> GetCrmKyc(int? crmuserInfoType);

        /// <summary>
        ///  根据账户获取信息
        /// </summary>
        /// <param name="login"></param>
        /// <returns></returns>
        List<CrmUserInfo> GetCrmUserInfo(int crmId);


        /// <summary>
        /// 查询是否有待审核记录
        /// </summary>
        /// <param name="crmId"></param>
        /// <param name="crmuserInfoType"></param>
        /// <returns></returns>
        CrmUserInfo GetCrmUserInfo(int crmId, int crmuserInfoType);

        /// <summary>
        /// 提交信息申请
        /// </summary>
        /// <param name="id"></param>
        /// <param name="type"></param>
        /// <param name="loginName"></param>
        /// <param name="inputModels"></param>
        /// <returns></returns>
        int SubmitUserInfo(int id, int type, List<InputModel> inputModels);
    }
}
